package edu.pku.ss.blackhole.templates;

import edu.pku.ss.blackhole.util.IOUtil;
import edu.pku.ss.blackhole.entities.*;

public class MockTp extends Template {
	
	public MockTp(){
		super();
		st = Template.read(IOUtil.getPath() + "\\templates\\Mock.tp");
	}
	
	public void setAttribute(String attName,Object value){
		if(st!=null){
			//System.out.println(value.getClass().toString().indexOf("ClassEntity"));
			if(value.getClass().toString().indexOf("ClassEntity")>0){
				ClassEntity ent = (ClassEntity)value;
				if(ent.getPackageName().length()!=0){
					ent.setPackageName("package " + ent.getPackageName() + ";");
					
				}
				st.setAttribute(attName, ent);
			}
			else
				st.setAttribute(attName, value);
		}
	}

	@Override
	public void doProcess() {
		// TODO Auto-generated method stub
		
	}


}
